Optimal. Leaf size=58 \[ \frac{x (A b-a B)}{b^2}-\frac{\sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{B x^3}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.035743, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {459, 321, 205} \[ \frac{x (A b-a B)}{b^2}-\frac{\sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{B x^3}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 459
Rule 321
Rule 205
Rubi steps
\begin{align*} \int \frac{x^2 \left (A+B x^2\right )}{a+b x^2} \, dx &=\frac{B x^3}{3 b}-\frac{(-3 A b+3 a B) \int \frac{x^2}{a+b x^2} \, dx}{3 b}\\ &=\frac{(A b-a B) x}{b^2}+\frac{B x^3}{3 b}-\frac{(a (A b-a B)) \int \frac{1}{a+b x^2} \, dx}{b^2}\\ &=\frac{(A b-a B) x}{b^2}+\frac{B x^3}{3 b}-\frac{\sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}\\ \end{align*}
Mathematica [A] time = 0.0460141, size = 57, normalized size = 0.98 \[ \frac{x (A b-a B)}{b^2}+\frac{\sqrt{a} (a B-A b) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{B x^3}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 68, normalized size = 1.2 \begin{align*}{\frac{B{x}^{3}}{3\,b}}+{\frac{Ax}{b}}-{\frac{Bax}{{b}^{2}}}-{\frac{aA}{b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{{a}^{2}B}{{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.23557, size = 277, normalized size = 4.78 \begin{align*} \left [\frac{2 \, B b x^{3} - 3 \,{\left (B a - A b\right )} \sqrt{-\frac{a}{b}} \log \left (\frac{b x^{2} - 2 \, b x \sqrt{-\frac{a}{b}} - a}{b x^{2} + a}\right ) - 6 \,{\left (B a - A b\right )} x}{6 \, b^{2}}, \frac{B b x^{3} + 3 \,{\left (B a - A b\right )} \sqrt{\frac{a}{b}} \arctan \left (\frac{b x \sqrt{\frac{a}{b}}}{a}\right ) - 3 \,{\left (B a - A b\right )} x}{3 \, b^{2}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.446227, size = 90, normalized size = 1.55 \begin{align*} \frac{B x^{3}}{3 b} - \frac{\sqrt{- \frac{a}{b^{5}}} \left (- A b + B a\right ) \log{\left (- b^{2} \sqrt{- \frac{a}{b^{5}}} + x \right )}}{2} + \frac{\sqrt{- \frac{a}{b^{5}}} \left (- A b + B a\right ) \log{\left (b^{2} \sqrt{- \frac{a}{b^{5}}} + x \right )}}{2} - \frac{x \left (- A b + B a\right )}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10586, size = 77, normalized size = 1.33 \begin{align*} \frac{{\left (B a^{2} - A a b\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{B b^{2} x^{3} - 3 \, B a b x + 3 \, A b^{2} x}{3 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]